<?php

//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->increments('id');
			$table->string('title')->default('')->comment('文章标题');
			$table->string('description')->default('')->comment('文章描述');
			$table->text('details')->comment('文章详情');
			$table->string('author',30)->default('')->comment('作者');
			$table->string('image')->default('')->comment('文章封面');
			$table->string('video')->default('')->comment('视频');
			$table->string('video_cover')->default('')->comment('视频封面');
			$table->unsignedTinyInteger('is_star')->default(0)->comment('是否推荐，0=不是，1=是');
			$table->unsignedInteger('is_release')->default('0')->comment('是否发布，0=不发布，1=发布');
			$table->unsignedInteger('real_pv')->default(0)->comment('真查看次数');
			$table->unsignedInteger('pv')->default(0)->comment('假查看次数');
			$table->string('seo_title')->default('')->comment('SEO标题');
			$table->string('seo_description')->default('')->comment('SEO描述');
			$table->string('seo_keyword')->default('')->comment('SEO关键字');
            $table->timestamps();
            $table->softDeletes();
            $table->comment = '文章表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('articles');
    }
}
